"""django_demo URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path

from app import views

urlpatterns = [
    # www.xxx.com/admin , 函数
    # path('admin/', admin.site.urls),
    path('index/', views.index),
    path('baidu/',views.redirect_baidu),
    # 登录
    path('login/',views.login),
    # 返回二进制数据
    path('picture/',views.pic),
    # 模拟搜索
    path('search/',views.search),
    # 模拟延迟获取数据
    path('delay/',views.delay),


    # 下载具体文章操作
    path('download/',views.download),
    # 数据库操作
    path('database/',views.database),
    # 数据库查询整行操作
    path('database/select/all/',views.database_select_all),
    # 数据库查询状态码操作
    path('database/select/state/',views.database_select_state),
    # 数据库查询文章内容
    path('database/select/article/',views.database_select_article),
    # 数据库更新状态码
    path('database/update/',views.database_update),
    # 数据库翻译标题
    path('database/translate/title',views.database_translate_title)
]
